package com.woniu.client;

import com.woniu.config.FeignConfig;
import com.woniu.config.FeignLogConfiguration;

import com.woniu.inlet.vo.MaterialBomVo;
import com.woniu.inlet.vo.WorkingProcedureVo;
import com.woniu.intlet.vo.WorkerVo;
import com.woniu.uitl.ResponseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "erp-system-management",qualifier = "systemClient",configuration = FeignConfig.class)
public interface WorkClient {

    @GetMapping("worker/workers/getByCode")
    @ApiOperation("根据code查询职工")
    public ResponseResult<Long> getWorkerByCode(@RequestParam("code") String code);

    @GetMapping("worker/workers/getById")
    @ApiOperation("根据id查询职工")
    public ResponseResult<WorkerVo> getWorkerById(@RequestParam("id") Long id);

    @GetMapping("materialBom/materialBoms/getMaterialBomByMaterialCode")
    public ResponseResult<MaterialBomVo> getMaterialBomByMaterialCode(@RequestParam("materialCode") String materialCode);

    @GetMapping("workingProcedure/workingProcedures/getByCode")
    @ApiOperation("根据code查询")
    public ResponseResult<WorkingProcedureVo> getByCode(@RequestParam("code") String code);
}
